package networkinstance;

public class GetIP {
    public static void main(String[] args) {
        java.net.InetAddress address = null;
        try {
            address = java.net.InetAddress.getByName("www.runoob.com");
        } catch (java.net.UnknownHostException e) {
            throw new RuntimeException(e);
        }
        System.out.println(address.getHostName() + "=" + address.getHostAddress());
        System.exit(0);
    }
}
